package me.lovatcat.springboot.demo.vo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 配置信息在单独的一个文件中时
 * @author acat on 2017-01-12 13:56
 */
@Component
@ConfigurationProperties(prefix = "car", locations = {"classpath:config/car.yml"})
public class Car {

    private String brand;

    private String color;

    private String price;

    private double speed;

    private String owner;

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    @Override
    public String toString() {
        return "Car{" +
                "brand='" + brand + '\'' +
                ", color='" + color + '\'' +
                ", price=" + price +
                ", speed=" + speed +
                ", owner='" + owner + '\'' +
                '}';
    }
}
